<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>条件渲染</title>
  </head>
  <body>
    <div id="app">
      <p>{{ show }}</p>
      <button v-on:click="show = !show">btn</button>
      <!-- v-if指令用于控制一个元素的是否渲染 -->
      <!-- v-if里面可以写变量和表达式 -->
      <p v-if="show === 1">现在你看到我了</p>
    </div>

    <script src="../../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          // show: false,
          show: 1,
        },
      });
    </script>
  </body>
</html>
